function queryUserBankForm(pageIndex,pageSize)
{
  var url =base+"/userBank/pagingUserBank.do?pageIndex="+pageIndex+"&pageSize="+pageSize;
          var params =jQuery("#queryForm").serialize();
          params=decodeURIComponent(params,true); 
          jQuery("#userBankContent").load(url+"&"+ encodeURI(encodeURI(params)));
}


//删除会员账号信息
function toDeleteUserBank(id,uid,uname,bankName)
{
	 if(window.confirm("确定要删除该记录?"))
	 {
              jQuery.post(
                      base+"/userBank/deleteUserBankInfo.do",
                      {"userBank*id":id,"userBank*uid":uid,"userBank*uname":uname,"userBank*bankName":bankName},
                      function(result){
                            var d= eval("("+result+")");
                           if(d.STATUS=="0")
                           {
                             alert("保存成功!");
                             location.href=base+"/userBank.do";
                            }
                           else
                            {
                             alert(d.MSG);
                            }
                      });
	 }
}


//修改会员账号信息
function toUpdateUserBank(id)
{
	  location.href=base+"/userBank/toUpdateUserBankInfo.do?userBankId="+id;
}

//保存会员账号信息
function saveUserBank()
{
	   var account=jQuery("#account").val();
	   if(!account)
	   {
		   alert("账号不能为空。");
		   return jQuery("#account").select();
	   }
	   var userName=jQuery("#userName").val();
	   if(!userName)
	   {
		   alert("持卡人姓名能为空。");
		   return jQuery("#userName").select();
	   }
	   jQuery("#userBankName").val(jQuery("#userBank option:selected").text());
       jQuery("#userBankForm").ajaxSubmit(
           {
              type:"post",
              clearForm: true,        // 是否清空form  
              resetForm: true,       // 是否重置form  
              success:function(data)
              { 
                 var d= eval("("+data+")");
                 if(d.STATUS=="0")
                 {
                    alert("保存成功!");
                    location.href=base+"/userBank.do";
                 }
                 else
                 {
                    alert(d.MSG);
                 }
              }
           }
          );
}